﻿using Microsoft.AspNetCore.Mvc;
using Swashbuckle.AspNetCore.Annotations;
using System;
using System.Threading.Tasks;
using Xms.Abp.AspNetCore.Mvc;

namespace BackgroundJobManagement;

[Route("api/management/background/jobs")]
[SwaggerTag("执行任务管理")]
public class BackgroundJobController: XmsCrudController<IBackgroundJobAppService, BackgroundJobResult, Guid, BackgroundJobsPagedParameter, BackgroundJobCreateParameter, BackgroundJobUpdateParameter>, IBackgroundJobAppService
{
    [HttpPost]
    [Route("{id}/restart")]
    public async Task RestartAsync(Guid id)
        => await CurrentService.RestartAsync(id);
}
